/*

*** This do file creates the replication results for 

An empirical test of the neo-Malthusian theory of fertility change, Population and Environment, 27 (4), 2006, pp. 327-336

Eric Neumayer (LSE)																			

Please report any errors to e.neumayer@lse.ac.uk

*/


* Estimation in levels, developing countries only
use "Fertility1.dta", replace
quietly xi: xtreg  totalfertilityrate immigrationtousrate gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust re
su totalfertilityrate immigrationtousrate unnetmigrate foodaidpc gdppcconstgrowth lngdppcconst femlabforce infmort if e(sample)
corr totalfertilityrate immigrationtousrate unnetmigrate foodaidpc gdppcconstgrowth lngdppcconst femlabforce infmort if e(sample)
corr immigrationtousrate unnetmigrate emigrationrate
quietly xi: xtreg  totalfertilityrate immigrationtousrate gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust fe
est store fixed
xi: xtreg  totalfertilityrate immigrationtousrate gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust re
hausman fixed
outreg using c:\table1, replace 3aster
xi: xtreg  totalfertilityrate immigrationtousrate gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust fe
outreg using c:\table1, append 3aster
quietly xi: xtreg  totalfertilityrate unnetmigrate gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust fe
est store fixed
xi: xtreg  totalfertilityrate unnetmigrate gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust re
hausman fixed
outreg using c:\table1, append 3aster
xi: xtreg  totalfertilityrate unnetmigrate gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust fe
outreg using c:\table1, append 3aster
use "Fertility2.dta", replace
reg  totalfertilityrate1990 emigrationrate1990 gdppcconstgrowth1990 lngdppcconst1990 femlabforce1990 infmort1990 if inc_highoecd==0, robust
outreg using c:\table1, append 3aster
su emigrationrate1990 if e(sample)
reg  totalfertilityrate2002 emigrationrate2000 gdppcconstgrowth2000 lngdppcconst2000 femlabforce2000 infmort2000 if inc_highoecd==0, robust
outreg using c:\table1, append 3aster
su emigrationrate2000 if e(sample)
use "Fertility1.dta", replace
quietly xi: xtreg  totalfertilityrate foodaidpc gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust fe
est store fixed
xi: xtreg  totalfertilityrate foodaidpc gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust re
hausman fixed
outreg using c:\table1, append 3aster
xi: xtreg  totalfertilityrate foodaidpc gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust fe
outreg using c:\table1, append 3aster

* Robustness analysis
* Lagging explanatory vars by one period
use "Fertility1.dta", replace
tsset
xi: xtreg  f.totalfertilityrate immigrationtousrate gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust re
xi: xtreg  f.totalfertilityrate immigrationtousrate gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust fe
xi: xtreg  f.totalfertilityrate unnetmigrate gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust re
xi: xtreg  f.totalfertilityrate unnetmigrate gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust fe
xi: xtreg  f.totalfertilityrate foodaidpc gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust re
xi: xtreg  f.totalfertilityrate foodaidpc gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust fe

* Interactions with GDP p.c.
use "Fertility1.dta", replace
xi: xtreg  totalfertilityrate immigrationtousrate  immigrationtousrate_lngdppcconst gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust re
xi: xtreg  totalfertilityrate immigrationtousrate  immigrationtousrate_lngdppcconst gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust fe
xi: xtreg  totalfertilityrate unnetmigrate  unnetmigrate_lngdppcconst gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust re
xi: xtreg  totalfertilityrate unnetmigrate  unnetmigrate_lngdppcconst gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust fe
xi: xtreg  totalfertilityrate foodaidpc  foodaidpc_lngdppcconst gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust re
xi: xtreg  totalfertilityrate foodaidpc  foodaidpc_lngdppcconst gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_highoecd==0, robust fe
use "Fertility2.dta", replace
reg  totalfertilityrate1990 emigrationrate1990  emigrationrate1990_lngdppc gdppcconstgrowth1990 lngdppcconst1990 femlabforce1990 infmort1990 if inc_highoecd==0, robust
reg  totalfertilityrate2002 emigrationrate2000  emigrationrate2000_lngdppc gdppcconstgrowth2000 lngdppcconst2000 femlabforce2000 infmort2000 if inc_highoecd==0, robust

* Analysis for separate income groups
use "Fertility1.dta", replace
xi: xtreg  totalfertilityrate immigrationtousrate  gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_low==1, robust fe
xi: xtreg  totalfertilityrate immigrationtousrate  gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_lowermiddle==1, robust fe
xi: xtreg  totalfertilityrate immigrationtousrate  gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_uppermiddle==1, robust fe
xi: xtreg  totalfertilityrate unnetmigrate  gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_low==1, robust fe
xi: xtreg  totalfertilityrate unnetmigrate  gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_lowermiddle==1, robust fe
xi: xtreg  totalfertilityrate unnetmigrate  gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_uppermiddle==1, robust fe
xi: xtreg  totalfertilityrate foodaidpc  gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_low==1, robust fe
xi: xtreg  totalfertilityrate foodaidpc  gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_lowermiddle==1, robust fe
xi: xtreg  totalfertilityrate foodaidpc  gdppcconstgrowth lngdppcconst femlabforce infmort  i.fiveyear if inc_uppermiddle==1, robust fe
use "Fertility2.dta", replace
reg  totalfertilityrate1990 emigrationrate1990   gdppcconstgrowth1990 lngdppcconst1990 femlabforce1990 infmort1990 if inc_low==1, robust
reg  totalfertilityrate1990 emigrationrate1990   gdppcconstgrowth1990 lngdppcconst1990 femlabforce1990 infmort1990 if inc_lowermiddle==1, robust
reg  totalfertilityrate1990 emigrationrate1990 gdppcconstgrowth1990 lngdppcconst1990 femlabforce1990 infmort1990 if inc_uppermiddle==1, robust
reg  totalfertilityrate2002 emigrationrate2000  gdppcconstgrowth2000 lngdppcconst2000 femlabforce2000 infmort2000 if inc_low==1, robust
reg  totalfertilityrate2002 emigrationrate2000   gdppcconstgrowth2000 lngdppcconst2000 femlabforce2000 infmort2000 if inc_lowermiddle==1, robust
reg  totalfertilityrate2002 emigrationrate2000   gdppcconstgrowth2000 lngdppcconst2000 femlabforce2000 infmort2000 if inc_uppermiddle==1, robust


